1. Field of the Invention
The present invention relates to an image reader used in an image-forming device such as a digital copy machine and a multifunction device.
2. Description of the Related Art
Some document readers employ an infrared ray sensor as a means for detecting a document size when the document is book-shaped. Other document readers use a line sensor for reading a document instead of the infrared ray sensor. To detect size of a document, it is necessary to obtain the lengths of the document in two directions, namely the length in the main scanning direction and the length in the auxiliary scanning direction. For detecting the length in the auxiliary scanning direction, when a line sensor is used to read the document, it is necessary to pre-scan the document in the auxiliary scanning direction. Because time is spent in scanning for acquiring the length in the auxiliary scanning direction, as the efficiency of the overall scanning operation degrades. To evade this, one approach is to use a line sensor for detecting the length in the main scanning direction and use an infrared ray sensor for detecting the length in the auxiliary scanning direction. Conventional document readers have been disclosed, for example, in Japanese Patent Laid-Open Nos. H10-257255, 2000-138798, and 2003-198809.
Japanese Patent Laid-Open No. H10-257255 (Patent Document 1), Japanese Patent Laid-Open No. 2000-138798 (Patent Document 2), and Japanese Patent Laid-Open No. 2003-198809 (Patent Document 3) disclose systems in which the length in the main scanning direction is detected on the assumption that the document is white and the area surrounding the document is black when a pressurizing plate that presses the document so that the document does not move is open.
In the Patent Document 2, the lengths are detected two times, once with a lamp that irradiates light on the document with the lamp ON, and a second time with the lamp OFF. This configuration is employed for eliminating effects of ambient light. In the Patent Document 3, the line sensor detects the document at two or more read positions in the main scanning direction to detect the length of document in the main scanning direction.
Although the systems disclosed the Patent Documents 1 and 2 are accurate, they systems are not effective in that a period of time until the pressurizing plate is closed can not be shortened. In the system disclosed in the Patent Document 3, whether the lamp is ON or OFF is not taken into consideration when detecting the lengths, in other words, lengths obtained the lamp is ON or OFF are simply averaged, so that there is a possibility that the lengths are not accurately detected.